package com.lam.generator.common.constant;

/**
 * 代码生成通用常量
 * 
 * @author lam
 */
public class GeneratorConstant {
	
    /** Java代码目录 */
    public static final String JAVA_MAIN_SRC = "/src/main/java/";
    
    /** 默认上级菜单，顶层菜单 */
    public static final String DEFAULT_PARENT_MENU_ID = "0";
    
    /** 树编码属性名 */
    public static final String TREE_CODE = "treeCode";
    /** 树父编码属性名 */
    public static final String TREE_PARENT_CODE = "treeParentCode";
    /** 树名称字段 */
    public static final String TREE_NAME = "treeName";
    
    /** 上级菜单ID字段 */
    public static final String PARENT_MENU_ID = "parentMenuId";
    /** 上级菜单名称字段 */
    public static final String PARENT_MENU_NAME = "parentMenuName";
    
    /** 表唯一配置-唯一字段名称属性名 */
    public static final String TABLE_UNIQUE_FIELD = "uniqueField";
    /** 表唯一配置-查询字段名称属性名 */
    public static final String TABLE_UNIQUE_QUERY_FIELD = "uniqueQueryField";
    /** 表唯一配置-条件SQL的字段属性名 */
    public static final String TABLE_UNIQUE_CONDITION_FIELD = "uniqueConditionField";
    
    /** 普通单表（增删改查） */
    public static final String TEMP_TYPE_SIMPLE = "simple";
    /** 普通树表（增删改查） */
    public static final String TEMP_TYPE_SIMPLE_TREE = "simpleTree";
    
    /** 数据库字符串类型(带长度的) */
    public static final String[] COLUMNTYPE_STR_WITH_LENGTH = { "char", "varchar", "narchar", "varchar2"};
    /** 数据库字符串类型(不带长度的) */
    public static final String[] COLUMNTYPE_STR_WITH_NO_LENGTH = { "tinytext", "text", "mediumtext", "longtext"};
    /** 数据库字符串类型 */
    public static final String[] COLUMNTYPE_STR = { "char", "varchar", "narchar", "varchar2", "tinytext", "text",
    		"mediumtext", "longtext" };

    /** 数据库时间类型 */
    public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "timestamp" };
    /** 数据库时间类型 */
    public static final String[] COLUMNTYPE_DATE = { "date" };
    /** 数据库数字类型 */
    public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer",
            "bigint", "float", "float", "double", "decimal" };
    public static final String[] COLUMNTYPE_LONG_NUMBER = { "number", "bigint" };

    
    /** 页面不需要编辑字段 */
    public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "update_by", "update_time" };
    /** 页面不需要显示的列表字段 */
    public static final String[] COLUMNNAME_NOT_LIST = { "id", "create_by", "create_time", "update_by" };
    /** 页面不需要查询字段 */
    public static final String[] COLUMNNAME_NOT_QUERY = { "id", "create_by", "create_time", "update_by", "update_time", "remark" };
    /** 页面不需要查询字段类型 */
    public static final String[] JAVA_TYPE_NOT_QUERY = { "BigDecimal", "long", "Integer", "double", "float" };
    
    /** Entity基类字段 */
    public static final String[] BASE_ENTITY = { "id", "createBy", "createTime", "updateBy", "updateTime", "remark" };
    /** Tree基类字段 */
    public static final String[] TREE_ENTITY = { "parentName", "parentId", "orderNum", "ancestors", "children" };

    
    /** 文本框 */
    public static final String HTML_INPUT = "input";
    /** 数字文本框 */
    public static final String HTML_INPUT_NUMBER = "inputNumber";
    /** 文本域 */
    public static final String HTML_TEXTAREA = "textarea";
    /** 下拉框 */
    public static final String HTML_SELECT = "select";
    /** 单选框 */
    public static final String HTML_RADIO = "radio";
    /** 复选框 */
    public static final String HTML_CHECKBOX = "checkbox";
    /** 日期时间控件 */
    public static final String HTML_DATETIME = "datetime";
    /** 日期控件 */
    public static final String HTML_DATE = "date";
    
    
    /** 字符串类型 */
    public static final String TYPE_STRING = "String";
    /** 整型 */
    public static final String TYPE_INTEGER = "Integer";
    /** 长整型 */
    public static final String TYPE_LONG = "Long";
    /** 浮点型 */
    public static final String TYPE_DOUBLE = "Double";
    /** 高精度计算类型 */
    public static final String TYPE_BIGDECIMAL = "BigDecimal";
    /** 时间类型 */
    public static final String TYPE_DATE = "Date";

    /** 模糊查询 */
    public static final String QUERY_LIKE = "LIKE";

    /** 需要 */
    public static final int REQUIRE = 1;
    
    /** 表唯一配置，代码模块表(gen_code_module) - module 字段 */
    public static final String UNIQUE_CODE_MODULE = "codeModule";
    
}
